﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>Door: DoorTester Class Reference</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                Door: DoorTester Class Reference
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">DoorTester Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="DoorTester" -->
<p><code>#include &lt;<a class="el" href="_door_tester_8h_source.html">DoorTester.h</a>&gt;</code></p>

<p><a href="class_door_tester-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#a80abe00f8be6ba27f59e418336c8c162">DoorTester</a> (<a class="el" href="class_door.html">Door</a> &amp;door, boost::asio::io_service &amp;io_service)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#a5aca0f4ab97924adcbfe0a83853967bb">~DoorTester</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#acb66e5a64a0a6583d817bbb88c12c71c">EvStartTest</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_door.html">Door</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#ae8b4d02dae75fec3c80f8ea4522f7906">GetDoor</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#af7dd2db4d39e445742fbe8311d59719f">GetOpenDuration</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_door_tester.html">DoorTester</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#af9d22516d32c4595c9a4a496de9afd52">operator=</a> (const <a class="el" href="class_door_tester.html">DoorTester</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DoorTesterContext &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#af78eddb92dd782a6c02c384b0b0339b5">GetContext</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DoorTesterContext *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_door.html">Door</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_door_tester.html#a158bb8f694a3d08994e22390f1d50348">m_door</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_door_tester_8h_source.html#l00014">14</a> of file <a class="el" href="_door_tester_8h_source.html">DoorTester.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a80abe00f8be6ba27f59e418336c8c162"></a><!-- doxytag: member="DoorTester::DoorTester" ref="a80abe00f8be6ba27f59e418336c8c162" args="(Door &amp;door, boost::asio::io_service &amp;io_service)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DoorTester::DoorTester </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_door.html">Door</a> &amp;&#160;</td>
          <td class="paramname"><em>door</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boost::asio::io_service &amp;&#160;</td>
          <td class="paramname"><em>io_service</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8cpp_source.html#l00008">8</a> of file <a class="el" href="_door_tester_8cpp_source.html">DoorTester.cpp</a>.</p>
<div class="fragment"><pre class="fragment">                                                                  : <a class="code" href="class_door_tester.html#a158bb8f694a3d08994e22390f1d50348">m_door</a>(door)
{
    <a class="code" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a> = <span class="keyword">new</span> DoorTesterContext(*<span class="keyword">this</span>, io_service);
    <a class="code" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a>-&gt;SetObserver(SmBoostObserver::GetInstance());
    <a class="code" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a>-&gt;EnterInitialState();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a5aca0f4ab97924adcbfe0a83853967bb"></a><!-- doxytag: member="DoorTester::~DoorTester" ref="a5aca0f4ab97924adcbfe0a83853967bb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DoorTester::~DoorTester </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8cpp_source.html#l00015">15</a> of file <a class="el" href="_door_tester_8cpp_source.html">DoorTester.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keyword">delete</span> <a class="code" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a>;
}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acb66e5a64a0a6583d817bbb88c12c71c"></a><!-- doxytag: member="DoorTester::EvStartTest" ref="acb66e5a64a0a6583d817bbb88c12c71c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DoorTester::EvStartTest </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8cpp_source.html#l00029">29</a> of file <a class="el" href="_door_tester_8cpp_source.html">DoorTester.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="class_door_tester.html#af78eddb92dd782a6c02c384b0b0339b5">GetContext</a>().EvStartTest();
}
</pre></div>
</div>
</div>
<a class="anchor" id="af78eddb92dd782a6c02c384b0b0339b5"></a><!-- doxytag: member="DoorTester::GetContext" ref="af78eddb92dd782a6c02c384b0b0339b5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DoorTesterContext &amp; DoorTester::GetContext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8cpp_source.html#l00020">20</a> of file <a class="el" href="_door_tester_8cpp_source.html">DoorTester.cpp</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keywordflow">if</span>(<a class="code" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a> != NULL){
        <span class="keywordflow">return</span> *<a class="code" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">m_pContext</a>;
    } <span class="keywordflow">else</span> {
        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;context is not set&quot;</span>);
    }
}
</pre></div>
</div>
</div>
<a class="anchor" id="ae8b4d02dae75fec3c80f8ea4522f7906"></a><!-- doxytag: member="DoorTester::GetDoor" ref="ae8b4d02dae75fec3c80f8ea4522f7906" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_door.html">Door</a>&amp; DoorTester::GetDoor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8h_source.html#l00024">24</a> of file <a class="el" href="_door_tester_8h_source.html">DoorTester.h</a>.</p>
<div class="fragment"><pre class="fragment">{<span class="keywordflow">return</span> <a class="code" href="class_door_tester.html#a158bb8f694a3d08994e22390f1d50348">m_door</a>;}
</pre></div>
</div>
</div>
<a class="anchor" id="af7dd2db4d39e445742fbe8311d59719f"></a><!-- doxytag: member="DoorTester::GetOpenDuration" ref="af7dd2db4d39e445742fbe8311d59719f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int DoorTester::GetOpenDuration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8h_source.html#l00026">26</a> of file <a class="el" href="_door_tester_8h_source.html">DoorTester.h</a>.</p>
<div class="fragment"><pre class="fragment">{<span class="keywordflow">return</span> 1000;};
</pre></div>
</div>
</div>
<a class="anchor" id="af9d22516d32c4595c9a4a496de9afd52"></a><!-- doxytag: member="DoorTester::operator=" ref="af9d22516d32c4595c9a4a496de9afd52" args="(const DoorTester &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_door_tester.html">DoorTester</a>&amp; DoorTester::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_door_tester.html">DoorTester</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a158bb8f694a3d08994e22390f1d50348"></a><!-- doxytag: member="DoorTester::m_door" ref="a158bb8f694a3d08994e22390f1d50348" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_door.html">Door</a>&amp; <a class="el" href="class_door_tester.html#a158bb8f694a3d08994e22390f1d50348">DoorTester::m_door</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8h_source.html#l00035">35</a> of file <a class="el" href="_door_tester_8h_source.html">DoorTester.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8581d2694ec8a1d04323bc60930cb103"></a><!-- doxytag: member="DoorTester::m_pContext" ref="a8581d2694ec8a1d04323bc60930cb103" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DoorTesterContext* <a class="el" href="class_door_tester.html#a8581d2694ec8a1d04323bc60930cb103">DoorTester::m_pContext</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_tester_8h_source.html#l00034">34</a> of file <a class="el" href="_door_tester_8h_source.html">DoorTester.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_door_tester_8h_source.html">DoorTester.h</a></li>
<li><a class="el" href="_door_tester_8cpp_source.html">DoorTester.cpp</a></li>
</ul>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
